<div class="layout-menu-wrapper layout-menu-dark" [ngClass]="{'active': menuActive}" *ngIf="showmenu">
  <div class="user-panel clearfix">
    <div class="pull-left image">
      <img src="assets/images/user2-160x160.jpg" class="img-circle" alt="User Image">
    </div>
    <div class="pull-left info">
      <p>{{userName}}</p>
      <a (click)="logOut()"><i class="fa fa-circle text-success"></i><span>退出</span></a>
    </div>

    <div class="navbar-custom-menu right">
      <ul class="nav navbar-nav">
        <li class="dropdown messages-menu {{showMessage?'open':''}}" (click)="showMessage = !showMessage">
          <a  href="javascript:void(0)"  class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
            <!--<i class="fa fa-comment"></i>-->
          </a>
          <!--
          <ul class="dropdown-menu">
            <li class="header">You have 4 messages</li>
            <li>
              <ul class="menu">
                <li>
                  <a href="#">
                    <div class="pull-left">
                      <img src="assets/images/user2-160x160.jpg" class="img-circle" alt="User Image">
                    </div>
                    <h4>
                      Support Team
                      <small><i class="fa fa-clock-o"></i> 5 mins</small>
                    </h4>
                    <p>Why not buy a new awesome theme?</p>
                  </a>
                </li>

                <li>
                  <a href="#">
                    <div class="pull-left">
                      <img src="assets/images/user3-128x128.jpg" class="img-circle" alt="User Image">
                    </div>
                    <h4>
                      AdminLTE Design Team
                      <small><i class="fa fa-clock-o"></i> 2 hours</small>
                    </h4>
                    <p>Why not buy a new awesome theme?</p>
                  </a>
                </li>
                <li>
                  <a href="#">
                    <div class="pull-left">
                      <img src="assets/images/user4-128x128.jpg" class="img-circle" alt="User Image">
                    </div>
                    <h4>
                      Developers
                      <small><i class="fa fa-clock-o"></i> Today</small>
                    </h4>
                    <p>Why not buy a new awesome theme?</p>
                  </a>
                </li>
                <li>
                  <a href="#">
                    <div class="pull-left">
                      <img src="assets/images/user3-128x128.jpg" class="img-circle" alt="User Image">
                    </div>
                    <h4>
                      Sales Department
                      <small><i class="fa fa-clock-o"></i> Yesterday</small>
                    </h4>
                    <p>Why not buy a new awesome theme?</p>
                  </a>
                </li>
                <li>
                  <a href="#">
                    <div class="pull-left">
                      <img src="assets/images/user4-128x128.jpg" class="img-circle" alt="User Image">
                    </div>
                    <h4>
                      Reviewers
                      <small><i class="fa fa-clock-o"></i> 2 days</small>
                    </h4>
                    <p>Why not buy a new awesome theme?</p>
                  </a>
                </li>
              </ul>
            </li>
            <li class="footer"><a href="#">See All Messages</a></li>
          </ul>
          -->
        </li>
        <li class="dropdown notifications-menu open">
          <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
            <!--<i class="fa fa-bell-o"></i>-->
            <!--<span class="label label-warning">10</span>-->
          </a>
        </li>
      </ul>
    </div>
  </div>
  <ul class="layout-menu" >
      <li *ngFor="let menu of menus;let i = index">
        <a [class.active]='menu.isOpen'(click)="toggleMenuItem($event,menu)">
          <i class="fa  {{menu.icon?menu.icon:'fa-bars'}}"></i>
          <span>{{menu.name}}</span>
          <i class="fa fa-fw fa-angle-down" *ngIf="menu.hasChildrens"></i>
        </a>
        <ul class="{{menu.isOpen?'submenushow':'submenuhide'}}">
          <li *ngFor="let child of menu.children; let j = index" >
            <a  routerLink="{{child.route?child.route:'**'}}"
                (click)="closeMenu(i,j)"
                [class.active]="child.active">
              <span>{{child.name}}</span>
            </a>
            <div class="layout-menu-tooltip">
              <div class="layout-menu-tooltip-arrow"></div>
              <div class="layout-menu-tooltip-text">{{child.name}}</div>
            </div>
          </li>
        </ul>
      </li>
    </ul>
</div>




